<ion-view view-title="我发布的任务">
  <ion-content class="page">
    <div class="list">
      <div ng-repeat="item in groups">
        <ion-item class="item-stable item-icon-left" ng-click="toggleGroup(item)" ng-class="{active: isGroupShown(item)}">
          <i class="icon" ng-class="isGroupShown(item) ? 'ion-minus' : 'ion-plus'"></i>
          &nbsp;{{item.label}}
          <span class="badge badge-assertive">{{item.num}}</span>
        </ion-item>
        <div class="list">
          <div ng-repeat="vo in item.list">
            <ion-item class="item item-thumbnail-left"  ng-show="isGroupShown(item)" ng-click="toggleGroup(vo)">
              <img src="http://placeholder.cn/80x80">
              <h2>{{vo.property}}</h2>
              <p>{{vo.category}}</p>
            </ion-item>
            <div class="list">
              <div ng-repeat="v in vo.engineer" style="margin-left:15px;">
                <a class="item item-avatar" href="#" ng-show="isGroupShown(vo)">
                  <img src="http://placeholder.cn/40x40">
                  <div class="row">
                    <div class="col-80">
                      <h2 style="display:block;float: left;padding-right: 15px">{{v.name}}</h2>
                      <h2 style="display:block;float: right; padding-right:10px;">✮✮✮✮</h2>
                      <br>
                      {{v.explain}}
                    </div>
                    <div class="col-20">
                      <button class="button button-balanced button-small" style="float: right" ng-if="item.type=='waitingMe'">由TA完成</button>
                    </div>
                  </div>
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </ion-content>
</ion-view>
